package com.daogu.fuelcard.entity;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;

@Schema(title = "用户实体类")
public class User {

    @Schema(description = "用户id")
    private Integer id;

    @Schema(description = "用户名称")
    @NotBlank(message = "用户名不能为空")
    private String userName;

    @Schema(description = "用户密码")
    @NotBlank(message = "密码不能为空")
    private String password;

    @Schema(description = "用户性别码值")
    private Byte userSex;

    @Schema(description = "用户性别")
    private String userSexName;

    public User() {}

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public Byte getUserSex() {
        return userSex;
    }

    public void setUserSex(Byte userSex) {
        this.userSex = userSex;
    }

    public String getUserSexName() {
        return userSexName;
    }

    public void setUserSexName(String userSexName) {
        this.userSexName = userSexName;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    @Override
    public String toString() {
        return "User{" +
                "id=" + id +
                ", userName='" + userName + '\'' +
                ", password='" + password + '\'' +
                ", userSex=" + userSex +
                ", userSexName='" + userSexName + '\'' +
                '}';
    }
}
